package main

import "fmt"

var mp map[string]int

func main() {

	//要先make分配数据空间
	mp = make(map[string]int)

	mp["hello"] = 1

	v, ok := mp["hello"]

	if ok {
		fmt.Println(v, ok)
	}

	v, ok = mp["hell"]

	if ok {
		fmt.Println(v, ok)
	} else {
		fmt.Println(v)
	}
}
